﻿using System;

namespace Sustainalytics.Portfolios.Service.Models
{
    using Sustainalytics.Entities;

    public class PortfolioDto : PortfolioBaseDto
    {
        public DateTime DataCreated { get; set; }

        public DateTime? DateModified { get; set; }

        public string AddedByUserName { get; set; }

        public string AddedByFullName { get; set; }

        public int CompanyCount { get; set; }

        public bool IsMyPortfolio { get; set; }

        public PortfolioSharingStatus SharingStatus { get; set; }

        public bool HasSubscription { get; set; }

        public string Details { get; set; }

        public static object CreateWithNameIdUserIdAndIsAutomatic(Entities.PortfolioBase portfolio)
        {
            return new
            {
                portfolio.Id, portfolio.Name, portfolio.AddedByUserId, portfolio.IsAutomatic
            };
        }
    }
}